import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_demo/widget/screen_load.dart';
import 'package:flutter_demo/widget/search.dart';
import 'other/application.dart';
import 'widget/cards.dart';

class ApprovalRequestScreen extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _ApprovalRequestScreenState();
}

class _ApprovalRequestScreenState 
    extends State<ApprovalRequestScreen> with ScreenLoadMixin {
  
  @override
  void initState() {
    super.initState();
    Timer(Duration(milliseconds: 1000), () => loadFinish());
  }
  
  @override
  Widget buildChild(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('查看申报'),
      ),
      body: Stack(
        children: [
          Offstage(
            offstage: isHide,
            child: const Center(child: CircularProgressIndicator()),
          ),
          Offstage(
            offstage: !isHide,
            child: ListView(
              padding: EdgeInsets.all(32),
              shrinkWrap: true,
              children: [
                DataCard(
                  height: 600,
                  params: declareData,
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}